package com.chen.controller;

import com.chen.common.Result;
import com.chen.pojo.Picture;
import com.chen.service.Impl.PictureServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@Api(value = "PictureController",tags = "个人相册")
@RequestMapping("/pic")
public class PictureController {
    @Resource
    private PictureServiceImpl pictureService;


    @PostMapping("/add")
    @ApiOperation("添加")
    public Result<?> addPic(@RequestBody Picture picture){
        return pictureService.addPicture(picture);
    }
    @GetMapping("/findAll")
    @ApiOperation("查询所有")
    public Result<?> findAll(){
        return pictureService.queryAll();
    }




}
